import { HttpModule } from '@nestjs/axios'
import { Module } from '@nestjs/common'
import { RouterModule } from '@nestjs/core'
import { TerminusModule } from '@nestjs/terminus'

import { DataModule } from './data/data.module'
import { DeviceModule } from './device/device.module'
import { IotModule } from './iot/iot.module'
import { UserModule } from './user/user.module'
// import { HealthController } from './health.controller'

const modules = [DataModule, DeviceModule, IotModule, UserModule]

@Module({
  imports: [
    ...modules,
    TerminusModule,
    HttpModule,
    RouterModule.register([
      { path: '/health', module: HealthModule, children: modules },
    ]),
  ],
  // controllers: [HealthController],
  exports: [...modules],
})
export class HealthModule {}
